import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';

function sibling(elem: HTMLDivElement) {
	const r = [];
	let n = elem.parentNode.firstChild;
	for (; n; n = n.nextSibling) {
		if (n.nodeType === 1 && n !== elem) {
			r.push(n);
		}
	}
	return r;
}
export default async function a003(fd: IFeidaoAiBrowserComponent) {
	const current = get(fd, 'current') as HTMLDivElement;
	// debugger;
	const arr = sibling(current);
	current.classList.add('color-theme');
	arr.forEach((i: HTMLDivElement) => {
		i.classList.remove('color-theme');
	});
}
